﻿using Sustainalytics.ClientDW.Entities;
using Sustainalytics.DataLayer.Mongo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sustainalytics.CompanySearch.StressTest
{
    /// <summary>
    /// Company search stress test log entry.
    /// </summary>
    public class CompanySearchStressTestLogEntry
    {
        /// <summary>
        /// Test spec.
        /// </summary>
        public CompanySearchStressTestSpec TestSpec { get; set; }

        /// <summary>
        /// Query result.
        /// </summary>
        public MongoExplain Explain { get; set; }

        /// <summary>
        /// Whether current test ended with an error.
        /// </summary>
        public string ExceptionMessage { get; set; }

        public DateTime DateCreated { get; set; }


        /// <summary>
        /// Ctor.
        /// </summary>
        public CompanySearchStressTestLogEntry(CompanySearchStressTestSpec testSpec, MongoExplain explain, string exceptionMessage)
        {
            this.TestSpec = testSpec;
            this.Explain = explain;
            this.ExceptionMessage = exceptionMessage;
            this.DateCreated = DateTime.Now;
        }
    }
}
